package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author wzh
 * @TableName order
 */
@TableName(value ="orders")
@Data
public class Order implements Serializable {
    /**
     * 订单id，自增长主键
     */
    @TableId(value = "order_id")
    private Integer orderId;

    /**
     * 订单编号，唯一值
     */
    @TableField(value = "order_no")
    private String orderNo;

    /**
     * 订单状态，0-未付款，1-已付款，2-已发货，3-已签收，4-退货申请，5-退货中，6-已退货，7-取消交易
     */
    @TableField(value = "order_status")
    private Integer orderStatus;

    /**
     * 书本数量
     */
    @TableField(value = "book_num")
    private Integer bookNum;



    /**
     * 书本id
     */
    @TableField(value = "book_Id")
    private Integer bookId;


    /**
     * 书本总价值
     */
    @TableField(value = "book_all_price")
    private Double bookAllPrice;

    /**
     * 已付订单金额
     */
    @TableField(value = "order_money")
    private Double orderMoney;

    /**
     * 运费金额
     */
    @TableField(value = "shiopping_cost")
    private Double shioppingCost;

    /**
     * 发票 0-不需要，1-需要
     */
    @TableField(value = "invoice")
    private Integer invoice;

    /**
     * 地址编号 1-
     */
    @TableField(value = "address_id")
    private Integer addressId;

    /**
     * 订单支付渠道 1-微信，2-支付宝，3-建行，4-农业银行
     */
    @TableField(value = "pay_channel")
    private Integer payChannel;

    /**
     * 下单时间
     */
    @TableField(value = "create_time")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 付款时间
     */
    @TableField(value = "pay_time")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 发货时间
     */
    @TableField(value = "set_out_time")
    private Date setOutTime;

    /**
     * 客户编号
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 客户备注
     */
    @TableField(value = "user_comment")
    private String userComment;


    /**
     * 收货人姓名
     */
    @TableField(value = "username")
    private String userName;


    /**
     * 收货人电话
     */
    @TableField(value = "phone_num")
    private String phoneNum;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}